package com.jd.bluej.dubboj.modle;

import java.io.Serializable;

public class ResponseResult<T> implements Serializable {

	private static final long serialVersionUID = 6076358405199005360L;
	private boolean flag=true;
	private String message="";
	private T result;
	
	public ResponseResult(){}
	public ResponseResult(T result){
		this.result = result;
	}
	public ResponseResult(boolean flag,T result){
		this.flag= flag;
		this.result = result;
	}
	public ResponseResult(boolean flag,String message,T result){
		this.flag= flag;
		this.message=message;
		this.result = result;
	}
	
	public boolean isFlag() {
		return flag;
	}
	public void setFlag(boolean flag) {
		this.flag = flag;
	}
	public String getMessage() {
		return message;
	}
	public void setMessage(String message) {
		this.message = message;
	}
	public T getResult() {
		if(result==null){
			result=(T) new String("false");
		}
		return result;
	}
	public void setResult(T result) {
		this.result = result;
	}
	
	

}
